<? include '../server_config.php'; ?>
<? 

if($_SESSION['admin']!=true)
{
	?>
	<script>location.href='login.php'</script>
	<?
	return;
}

?>

<?
	$sql = "INSERT INTO ud_news VALUES ('','".$_POST['title']."', '".$_POST['content']."','".$_POST['news_date']."',CURRENT_TIMESTAMP);";
	
//	echo $sql;
	$result = mysql_query($sql,$connect);

?>

<script> history.back();</script>